package executable.basic;

public class BasicStaticOperations {

    public static int simpleReturn54() {
        return 54;
    }

    public static int simpleAdd30() {
        int i = 20;
        int j = 10;
        return i + j;
    }

    public static int simpleSub20() {
        int i = 30;
        int j = 10;
        return i - j;
    }

    public static int simpleMult49() {
        int i = 7;
        int j = 7;
        return i * j;
    }

    public static int simpleDiv3() {
        int i = 21;
        int j = 7;
        return i / j;
    }

    public static int simpleCalc1() {
        int i = 105;
        i++;
        return i;
    }

    public static int simpleCalc2() {
        int i, j = 10;
        i = 30;
        return i * j;
    }

    public static int simpleCalc3() {
        int i = 15;
        int j = 10 + i + 30;
        return j;
    }

    public static int simpleCalc4() {
        int i = 15;
        int j = 10;
        i *= j;    //150
        i -= j;    //140
        i /= j;     //14
        i += 2;
        return i;
    }

    public static int condition() {
        int i = 20;
        int j = 20;

        if (i == j) {
            i = 5;
        } else {
            i = 15;
        }
        return i;
    }

    public static int condition2() {
        int i = 5;
        int j = 20;

        if (i == j) {
            i = 5;
        } else {
            i = 15;
        }
        return i;
    }

    public static int condition3() {
        int i = 20;
        int j = 20;

        if (i != j) {
            i = 5;
        } else {
            i = 15;
        }
        return i;
    }

    public static int condition4() {
        int i = 10;
        int j = 20;

        if (i != j) {
            return 5;
        } else {
            i = 15;
        }
        return i;
    }

    public static int doFor1() {
        int j = 2;
        for (int i = 0; i < 10; i++) {
            j++;
        }
        return j;
    }

    public static boolean returnTrue() {
        return true;
    }

    public static boolean returnFalse() {
        return false;
    }

    public static boolean andBoolean() {
        boolean x1 = true;
        boolean x2 = false;
        return x1 & x2;
    }

    public static boolean andBoolean2() {
        boolean x1 = true;
        boolean x2 = false;
        return x1 && x2;
    }

    public static boolean boolean3() {
        boolean x1 = true;
        boolean x2 = false;
        if (x1) {
            return !x2;
        } else {
            return !x2;
        }
    }

    public static boolean boolean4() {
        boolean x1 = false;
        boolean x2 = false;
        if (x1) {
            return !x2;
        } else {
            return !x2;
        }
    }

    public static boolean boolean5() {
        boolean x1 = false;
        boolean x2 = true;
        return x1 | x2;
    }

    public static boolean boolean6() {
        boolean x1 = false;
        boolean x2 = true;
        return x1 || x2;
    }

    public static boolean boolean7() {
        boolean x1 = true;
        boolean x2 = false;
        boolean x3 = true;
        if ((x1 || x2) && (x2 | x1)) {
            x2 = !x2;
            return x2;
        } else {
            x3 = !x3;
            return x3;
        }
    }
}
